Some more menu-related docs
authorMatthias Clasen <mclasen@redhat.com>
Wed, 14 Dec 2011 11:51:54 +0000 (06:51 -0500)
committerRyan Lortie <desrt@desrt.ca>
Mon, 19 Dec 2011 17:51:12 +0000 (12:51 -0500)
gtk/gtkapplication.c
gtk/gtkbuilder.c

index ed14aa5840955868f48b6372fb28c9958e65b527..7ff1ed0a4aa518497b1a7f179bd6c911c28cc0e4 100644 (file)
  * While GtkApplication works fine with plain #GtkWindows, it is recommended
  * to use it together with #GtkApplicationWindow.
  *
+ * To set an app menu on a GtkApplication, use g_application_set_app_menu().
+ * The #GMenuModel that this function expects is usually constructed using
+ * #GtkBuilder, as seen in the following example. To set a menubar that will
+ * be automatically picked up by #GApplicationWindows, use
+ * g_application_set_menubar().
+ *
  * <example id="gtkapplication"><title>A simple application</title>
  * <programlisting>
  * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../examples/bloatpad.c">
index de24427bb5d9a1577de36f0c223f423f4fbf8a5f..fc8d0f91963fbeaa96a6175e746b372f62fb058e 100644 (file)
  * <link linkend="GtkTextTagTable-BUILDER-UI">GtkTextTagTable</link>.
  * </para>
  * </refsect2>
+ * <refsect2 id="BUILDER-UI">
+ * <title>Embedding other XML</title>
+ * <para>
+ * Apart from the language for UI descriptions that has been explained
+ * in the previous section, GtkBuilder can also parse XML fragments
+ * of <link linkend="gio-GMenu-Markup">GMenu markup</link>. The resulting
+ * #GMenu object and its named submenus are available via
+ * gtk_builder_get_object() like other constructed objects.
  */
 
 #include "config.h"